<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<div id="app">
			<table border="1px" cellspacing="0px" cellpadding="0px">
				<tr>
					<th>索引</th>
					<th>名字</th>
					<th>年龄</th>
				</tr>
				
				
				<!-- o是当前元素对象，i是下标 -->
				<tr v-for="(item,index) in users">
					<td>{{index}}</td>
					<td>{{item.name}}</td>
					<td>{{item.age}}</td>
				</tr>
			</table>
		</div>
		
		<script src="../js/vuejs-2.5.16.js" type="text/javascript" charset="utf-8"></script>
		
		<script type="text/javascript">
			const vue = new Vue({
				el: "#app",
				data: {
					users:[
						{name:"zhangsan",age:11},
						{name:"lisi",age:22},
						{name:"wangwu",age:33}
					]
				}
			})
		</script>
	</body>
</html>
